VectorImage LayerList
Get or Set the layer list associated with this vector Image
public IList<ScanLayer> LayerList {get;Set} |
Return value
IList<ScanLayer> | list of layers |
Example
Copy
scanDocument = scanDeviceManager.CreateScanDocument(GetselectedDeviceUniqueName(), DistanceUnit.Millimeters, false);
if (scanDocument != null)
{
VectorImage vectorImage = scanDocument.CreateVectorImage("image1", DistanceUnit.Millimeters);
vectorImage.SetMarkSpeed(1000);
vectorImage.SetJumpSpeed(2000);
vectorImage.SetJumpDelay(100);
vectorImage.SetMarkDelay(100);
//Set Laser Delays
vectorImage.SetLaserOnDelay(10);
vectorImage.SetLaserOffDelay(10);
CircleShape circleShape = new CircleShape();
circleShape.CenterPoint.X = 0.0f;
circleShape.CenterPoint.Y = 0.0f;
circleShape.CenterPoint.Z = 0.0f;
circleShape.Clockwise = true;
circleShape.Radius = 10;
circleShape.StartAngle = 0;
circleShape.MaximumSegmentationError = 0.001f;
ScanLayer newLayer = new ScanLayer();
newLayer.AddToShapeList(circleShape);
vectorImage.LayerList.Add(newLayer);
SpiralShape spiral = new SpiralShape();
spiral.CenterPoint = new Point3D(-1, 0, 0);
spiral.InnerRadius = 0.2f;
spiral.OuterRadius = 1.2f;
spiral.Angle = 0.3f;
spiral.Pitch = 0.1f;
newLayer = new ScanLayer();
newLayer.AddToShapeList(spiral);
vectorImage.LayerList.Add(newLayer);
// Now update the scanDocument
List<VectorImage> updatedVectorImageList = new List<VectorImage>();
updatedVectorImageList.Add(vectorImage);
scanDocument.SetVectorImages(updatedVectorImageList);
scanDocument.Scripts.Add(new ScanningScriptChunk("defaultScript", "ScanAll()"));
//scanDocument.Scripts.Add(DefautScript());
try
{
scanDocument.StartScanning();
}
catch
{
}
}